package rpc

type IKVStoreRPC interface {
	ExecuteKVCmd(cmd *KVCmd, ret *KVRet) error
}

type KVCmd struct {
	OPCode  KVOPCode
	Key     []byte
	Content []byte
}

type KVOPCode int

const (
	KVGet KVOPCode = iota
	KVPut KVOPCode = iota
	KVDel KVOPCode = iota
)

type KVRet struct {
	Code    KVRetCode
	Key     []byte
	Content []byte
}

type KVRetCode int

const (
	KVOk            KVRetCode = iota
	KVKeyNotFound   KVRetCode = iota
	KVInternalError KVRetCode = iota
)
